package com.ibeeking.found.common.enums.marketing;

/**
 * @Author ibeeking
 * @Date: 2021-01-05 19:15
 * @Description: 活动类型枚举
 */
public enum CampaignTypeEnum {
    /**
     * 活动类型枚举
     */
    PRE_SALES(1, "售前"),
    ON_SALE(2, "售中"),
    AFTER_SALE(3, "售后"),
    ;

    private Integer code;
    private String lable;

    CampaignTypeEnum(Integer code, String lable) {
        this.code = code;
        this.lable = lable;
    }

    public String getLable() {
        return lable;
    }

    public Integer getCode() {
        return code;
    }

    public static CampaignTypeEnum getEnum(Integer code) {
        for (CampaignTypeEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj;
            }
        }
        return null;
    }
}
